#include <bits/stdc++.h>

using namespace std;
int cnt,maxCnt;
vector<int> temp,result;
int help = 1;

int main(){
    freopen("../A1096.txt","r",stdin);
    int N;
    cin>>N;

    vector<int> factor;

    for(int i=2;i<=N;i++){
        if(N%i==0) factor.push_back(i);
    }

    cnt = 1; temp.push_back(factor[0]); help = factor[0];
    for(int i=1;i<factor.size();i++){
        if(factor[i]==factor[i-1]+1 && help*factor[i]<=N){
            help *= factor[i];
            cnt++;
            temp.push_back(factor[i]);
        }else{
            if(cnt>maxCnt){
                maxCnt = cnt;
                result = temp;
            }
            temp.clear();
            cnt = 1;
            help = factor[i];
            temp.push_back(factor[i]);
        }
    }

    if(maxCnt){
        cout<<maxCnt<<endl;
        for(int i=0;i<result.size();i++){
            if(i) cout<<"*";
            cout<<result[i];
        }
    }else cout<<1<<endl<<N; //只有这个数本身时也算

}